\documentclass{article}
\usepackage[utf8]{inputenc}
\usepackage{amsmath}
\usepackage{amssymb}
\usepackage{graphicx}

\begin{document}
\section*{1}
Let $$p(x)=ax^3+bx^2+c x+d $$
Since $s\in S_3^2$,
\begin{align*}
    p(0)&=0=d \\
    p(1)&=1=a+b+c+d \\
    p'(1)&=-3=3a+2b+c \\
    p''(1)&=6=6a+2b \\
\end{align*}
We can calculate that
$$a=7,b=-18,c=12$$
so $$p(x)=7x^3-18x^2+12x $$
because $p''(0)\not =0$, s(x) is not a natural cubic spline.

\section*{2}
\subsection*{a}
For each $s_{i}\in s$,we have
$$a_{i}x_{i}^2+b_{i}x_{i}+c_{i}=f_{i}$$
$$a_{i}x_{i+1}^2+b_{i}x_{i+1}+c_{i}=f_{i+1}$$
The freedom of unknown variables is three,however,there are only two equations.
So an additional condition is needed to determine s uniquely.
\subsection*{b}
Let $$p_{i}(x)=a_{i}x^2+b_{i}x+c_{i}$$
Then
\begin{align*}
    a_{i}x_{i}^2+b_{i}x_{i}+c_{i}&=f_{i} \\
    a_{i}x_{i+1}^2+b_{i}x_{i+1}+c_{i}&=f_{i+1} \\
    2a_{i}x_{i}+b_{i}&=m_{i} 
\end{align*}
We can derive that
\begin{align*}
    a&=\frac{f_{i}-f_{i+1}}{(x_{i}-x_{i+1})^2}+\frac{m_{i}}{x_{i}-x_{i+1}} \\
    b&=-\frac{x_{i}+x_{i+1}}{x_{i}-x_{i+1}}m_{i}-\frac{2x_{i}(f_{i}-f_{i+1})}{(x_{i}-x_{i+1})^2} \\
    c&=f_{i}+\frac{x_{i}x_{i+1}}{x_{i}-x_{i+1}}m_{i}+\frac{2x_{i}^2(f_{i}-f_{i+1})}{(x_{i}-x_{i+1})^2}
\end{align*}

\subsection*{c}
We know
\begin{align*}
    a_{i}x_{i}^2+b_{i}x_{i}+c_{i}&=f_{i} \\
    a_{i}x_{i+1}^2+b_{i}x_{i+1}+c_{i}&=f_{i+1} \\ 
    2a_{i}x_{i}+b_{i}&=m_{i}
\end{align*}
According to above equations,we can drive a,b,c.
Then according to $$2a_{i}x_{i+1}+b_{i}=m_{i+1}$$
we can calculate $m_{i+1}$. 

\section*{3}
Let $$s_{2}(x)=ax^3+bx^2+d x+e $$
Since $s\in S_3^2$,
\begin{align*}
    s_{2}(0)&=1+c=e \\
    s_{2}'(0)&=3c=d \\
    s_{2}''(0)&=6c=2b \\
    s_{2}''(1)&=0=6a+2b 
\end{align*}
We can calculate that
$$a=-c,b=3c,d=3c,e=c+1$$
so $$s_{2}(x)=(-c)x^3+(3c)x^2+(3c)x+(c+1) $$
if one wants $s(1)=-1$,it indicates that $c=-\frac{1}{3}$.

\section*{4}
\subsection*{a}
Let $s=s_{1}$ in [-1,0] and $s=s_{2}$ in [0,1]

Let $$s_{1}(x)=a_{1}x^3+b_{1}x^2+c_{1}x+d_{1}$$
    $$s_{2}(x)=a_{2}x^3+b_{2}x^2+c_{2}x+d_{2}$$
Since $s\in C^2$,so
    $$s_{1}(0)=s_{2}(0)$$
    $$s_{1}'(0)=s_{2}'(0)$$
    $$s_{1}''(0)=s_{2}''(0)$$
That is
    $$b_{1}=b_{2}$$
    $$c_{1}=c_{2}$$
    $$d_{1}=d_{2}$$
\begin{align*}
    s_{1}(-1)&=0=-a_{1}+b-c+d \\
    s_{1}(0)&=1=d \\
    s_{2}(1)&=0=a_{2}+b+c+d \\
    s_{1}''(-1)&=0=-6a_{1}+2b \\
    s_{2}''(1)&=0=6a_{2}+2b 
\end{align*}
So,$$a_{1}=-\frac{1}{2},a_{2}=\frac{1}{2},b=-\frac{3}{2},c=0,d=1$$
$$s_{1}(x)=-\frac{1}{2}x^3-\frac{3}{2}x^2+1$$
$$s_{2}(x)=\frac{1}{2}x^3-\frac{3}{2}x^2+1$$
\subsection*{b}
We know 
    $$s_{1}''(x)=-3x-3$$
    $$s_{1}''(x)=3x-3$$
So,$$\int_{-1}^{1}(s''(x))^2=6$$
(1) $g(x)$ is the quadratic polynomial.
Because $g(x)\in C^2$,then $g(x)$ is a quadratic polynomial in [-1,1].
\begin{align*}
    g(-1)&=0=a-b+c \\
    g(0)&=1=c \\
    g(1)&=0=a+b+c
\end{align*}
Then $$g(x)=-x^2+1$$
$$\int_{-1}^{1}(g''(x))^2\mathrm{d}x=\int_{-1}^{1}4\mathrm{d}x=8$$
$$8>6$$
(2)$g(x)=f(x)$
$$\int_{-1}^{1}(g''(x))^2\mathrm{d}x=\frac{\pi^4}{16}\int_{-1}^{1}(\cos(\frac{\pi}{2}x))^2\mathrm{d}x=\frac{\pi^4}{16}$$
$$\frac{\pi^4}{16}\approx 6.08>6$$

\section*{5}
\subsection*{a}
$$B_{i}^{2}(x)=\frac{x-t_{i-1}}{t_{i+1}-t_{i-1}}B_{i}^{1}(x)+\frac{t_{i+2}-x}{t_{i+2}-t_{i}}B_{i+1}^{1}(x)$$
\begin{equation*}
    B_{i}^{1}(x)=
    \begin{cases}
    \frac{x-t_{i-1}}{t_{i}-t_{i-1}}& x\in (t_{i-1},t_{i}], \\
    \frac{t_{i+1}-x}{t_{i+1}-t_{i}}& x\in (t_{i},t_{i+1}], \\
    0& otherwise.
    \end{cases}
\end{equation*}
So,
\begin{equation*}
    B_{i}^{2}(x)=
    \begin{cases}
    \frac{(x-t_{i-1})^2}{(t_{i+1}-t_{i-1})(t_{i}-t_{i-1})}& x\in (t_{i-1},t_{i}]; \\
    \frac{(x-t_{i-1})(t_{i+1}-x)}{(t_{i+1}-t_{i-1})(t_{i+1}-t_{i})}+\frac{(t_{i+2}-x)(x-t_{i})}{(t_{i+2}-t_{i})(t_{i+1}-t_{i})}& x\in (t_{i},t_{i+1}]; \\
    \frac{(t_{i+2}-x)^2}{(t_{i+2}-t_{i})(t_{i+2}-t_{i+1})}& x\in (t_{i+1},t_{i+2}]; \\
    0& otherwise.
    \end{cases}
\end{equation*}
\subsection*{b}
\begin{equation*}
    \frac{d}{d x}B_{i}^{2}(x)=
    \begin{cases}
    \frac{2(x-t_{i-1})}{(t_{i+1}-t_{i-1})(t_{i}-t_{i-1})}& x\in (t_{i-1},t_{i}]; \\
    \frac{t_{i+1}+t_{i-1}-2x}{(t_{i+1}-t_{i-1})(t_{i+1}-t_{i})}+\frac{t_{i+2}+t_{i}-2x}{(t_{i+2}-t_{i})(t_{i+1}-t_{i})}& x\in (t_{i},t_{i+1}]; \\
    \frac{2(x-t_{i+2})}{(t_{i+2}-t_{i})(t_{i+2}-t_{i+1})}& x\in (t_{i+1},t_{i+2}]; \\
    0& otherwise.
    \end{cases}
\end{equation*}
We can calculate$B_{i}^{2}(t_{i}) and B_{i}^{2}(t_{i+1})$ and find it continuous.
$$\frac{d}{d x}B_{i}^{2}(t_{i})=\frac{2}{t_{i+1}-t_{i-1}}$$
$$\frac{d}{d x}B_{i}^{2}(t_{i+1})=\frac{-2}{t_{i+2}-t_{i}}$$
\subsection*{c}
We can find that there are not zero points in $(t_{i-1},t_{i}]$.
$\frac{d}{d x}B_{i}^{2}(x)$ is monotonic decrement in $(t_{i},t_{i+1})$.$\frac{d}{d x}B_{i}^{2}(t_{i})=\frac{2}{t_{i+1}-t_{i-1}}>0$and $\frac{d}{d x}B_{i}^{2}(t_{i+1})=\frac{-2}{t_{i+2}-t_{i}}<0$.So there is only one $x^{*}\in (t_{i},t_{i+1})$ satisfying $\frac{d}{d x}B_{i}^{2}(x)=0$.
$$x^{*}=\frac{t_{i+2}t_{i+1}-t_{i}t_{i-1}}{t_{i+2}+t_{i+1}-t_{i}-t_{i-1}}$$
\subsection*{d}
The conclusion is trivial for $x\not \in (t_{i},t_{i+1})$.

\begin{equation*}
    \frac{(x-t_{i-1})(t_{i+1}-x)}{(t_{i+1}-t_{i-1})(t_{i+1}-t_{i})}+\frac{(t_{i+2}-x)(x-t_{i})}{(t_{i+2}-t_{i})(t_{i+1}-t_{i})}<
    \frac{t_{i+1}-x}{t_{i+1}-t_{i}}+\frac{x-t_{i}}{t_{i+1}-t_{i}}=1
\end{equation*}
So $$\frac{d}{d x}B_{i}^{2}(x)\in [0,1)$$
\subsection*{e}
If $t_{i}=i$.
\begin{equation*}
    B_{i}^{2}(x)=
    \begin{cases}
    \frac{(x-i+1)^2}{2}& x\in(i-1,i]; \\
    \frac{-2x^2+(4i+2)x-2i^2-2i+1}{2}& x\in(i,i+1]; \\
    \frac{(i+2-x)^2}{2}& x\in(i+1,i+2]; \\
    0& otherwise.
    \end{cases}
\end{equation*}
The graph of $B_{i}^2$ can be derived from the translation of$B_{0}^2$.

The graph of $B_{0}^2$ is below.

\subsubsection*{Image}
\includegraphics[scale=1.0]{5(e).png}

\section*{6}
\begin{align*}
    LHS&=(t_{i+2}-t_{i-1})[t_{i-1},t_{i},t_{i+1},t_{i+2}](t-x)_{+}^{2} \\
    &=[t_{i},t_{i+1},t_{i+2}](t-x)_{+}^{2}-[t_{i-1},t_{i},t_{i+1}](t-x)_{+}^{2} \\
    &=\frac{1}{t_{i+2}-t_{i}}([t_{i+1},t_{i+2}](t-x)_{+}^{2}-[t_{i},t_{i+1}](t-x)_{+}^{2})-
    \frac{1}{t_{i+1}-t_{i-1}}([t_{i},t_{i+1}](t-x)_{+}^{2}-[t_{i-1},t_{i}](t-x)_{+}^{2}) \\
    &=\frac{1}{t_{i+2}-t_{i}}(\frac{(t_{i+2}-x)_{+}^{2}-(t_{i+1}-x)_{+}^{2}}{t_{i+2}-t_{i+1}}-\frac{(t_{i+1}-x)_{+}^{2}-(t_{i}-x)_{+}^{2}}{t_{i+1}-t_{i}}) \\
    &-\frac{1}{t_{i+1}-t_{i-1}}(\frac{(t_{i+1}-x)_{+}^{2}-(t_{i}-x)_{+}^{2}}{t_{i+1}-t_{i}}-\frac{(t_{i}-x)_{+}^{2}-(t_{i-1}-x)_{+}^{2}}{t_{i}-t_{i-1}}) \\
    &=\begin{cases}
    \frac{(x-t_{i-1})^2}{(t_{i+1}-t_{i-1})(t_{i}-t_{i-1})}& x\in (t_{i-1},t_{i}]; \\
    \frac{(x-t_{i-1})(t_{i+1}-x)}{(t_{i+1}-t_{i-1})(t_{i+1}-t_{i})}+\frac{(t_{i+2}-x)(x-t_{i})}{(t_{i+2}-t_{i})(t_{i+1}-t_{i})}& x\in (t_{i},t_{i+1}]; \\
    \frac{(t_{i+2}-x)^2}{(t_{i+2}-t_{i})(t_{i+2}-t_{i+1})}& x\in (t_{i+1},t_{i+2}]; \\
    0& otherwise.
    \end{cases}
\end{align*}
So the conclusion holds.
\section*{7}
By derivatives of B-splines,
$$\frac{d}{d x}B_{i}^{n}(x)=\frac{n B_{i}^{n-1}(x)}{t_{i+n-1}-t_{i-1}}-
\frac{n B_{i+1}^{n-1}(x)}{t_{i+n}-t_{i}}$$
Integral two sides,we can derive that
$$\int_{t_{i-1}}^{t_{i+n}}\frac{d}{d x}B_{i}^{n}(x)\mathrm{d}x=
\int_{t_{i-1}}^{t_{i+n-1}}\frac{n B_{i}^{n-1}(x)}{t_{i+n-1}-t_{i-1}}\mathrm{d}x
-\int_{t_{i}}^{t_{i+n}}\frac{n B_{i+1}^{n-1}(x)}{t_{i+n}-t_{i}}\mathrm{d}x$$
$$\int_{t_{i-1}}^{t_{i+n}}\frac{d}{d x}B_{i}^{n}(x)\mathrm{d}x=
B_{i}^n(t_{i+n})-B_{i}^n(t_{i-1})=0$$
Thus,
$$\frac{1}{t_{i+n-1}-t_{i-1}}\int_{t_{i-1}}^{t_{i+n-1}}B_{i}^{n-1}(x)\mathrm{d}x=\frac{1}{t_{i+n}-t_{i}}\int_{t_{i}}^{t_{i+n}}B_{i+1}^{n-1}(x)\mathrm{d}x$$
So,$\frac{1}{t_{i+n}-t_{i}}\int_{t_{i}}^{t_{i+n}}B_{i+1}^{n-1}(x)\mathrm{d}x$
is independent of i.
\section*{8}
\subsection*{a}
When m=4,n=2.
\begin{align*}
    [x_{i},x_{i+1},x_{i+2}]x^4&=\frac{1}{x_{i+2}-x_{i}}([x_{i+1},x_{i+2}]x^4-[x_{i},x_{i+1}]x^4) \\
    &=\frac{1}{x_{i+2}-x_{i}}(\frac{x_{i+2}^4-x_{i+1}^4}{x_{i+2}-x_{i+1}}-\frac{x_{i+1}^4-x_{i}^4}{x_{i+1}-x_{i}}) \\
    &=\frac{1}{x_{i+2}-x_{i}}(x_{i+2}^3+x_{i+1}^3+x_{i+2}x_{i+1}^2+x_{i+2}^2x_{i+1}-x_{i+1}^3-x_{i}^3+x_{i+1}x_{i}^2+x_{i+1}^2x_{i}) \\
    &=x_{i}^2+x_{i+1}^2+x_{i+2}^2+x_{i}x_{i+1}+x_{i}x_{i+2}+x_{i+1}x_{i+2} \\
    &=\tau_{2}(x_{i},x_{i+1},x_{i+2})
\end{align*}
\subsection*{b}
By the lemma on the recursive relation on complete symmetric polynomials.
\begin{align*}
    &(x_{n+1}-x_{1})\tau_{k}(x_{1},...,x_{n},x_{n+1}) \\
    =&\tau_{k+1}(x_{1},...,x_{n},x_{n+1})-\tau_{k+1}(x_{1},...,x_{n})-x_{1}\tau_{k}(x_{1},...,x_{n},x_{n+1}) \\
    =&\tau_{k+1}(x_{2},...,x_{n},x_{n+1})+x_{1}\tau_{k}(x_{1},...,x_{n},x_{n+1}) \\
    &-\tau_{k+1}(x_{1},...,x_{n})-x_{1}\tau_{k}(x_{1},...,x_{n},x_{n+1}) \\
    =&\tau_{k+1}(x_{2},...,x_{n},x_{n+1})-\tau_{k+1}(x_{1},...,x_{n})
\end{align*}
$$\tau_{m}(x_{i})=[x_{i}]x^m$$
Suppose the conclusion holds for n<m.Then
\begin{align*}
    &\tau_{m-n-1}(x_{i},...,x_{i+n+1}) \\
    =&\frac{\tau_{m-n}(x_{i+1},...,x_{i+n+1})-\tau_{m-n}(x_{i},...,x_{i+n})}{x_{i+n+1}-x_{i}} \\
    =&\frac{[x_{i+1},...,x_{i+n+1}]x^m-[x_{i},...,x_{i+n}]x^m}{x_{i+n+1}-x{i}} \\
    =&[x_{i},...,x_{i+n+1}]x^m
\end{align*}
The proof is completed.
\end{document}
